import Vue from 'vue'
import Vuex from 'vuex'
import router from '@/router'
import user from './user'
import goods from './goods'
import authRouter from '@/router/authRouter'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {

    },
    getters: {

    },
    mutations: {
        addAuthRouter() {
            //路由动态权限跳转
            router.addRoute(authRouter);
        }
    },
    actions: {

    },
    modules: {
        user,
        goods,
        // cart,
        // address,
    }
})

export default store;